#define _CRT_SECURE_NO_WARNINGS 1
#include"list.h"
#include"vector.h"

namespace lhl {
	void test1() {
		list<int> l1;
		l1.push_back(1);
		l1.push_back(2);
		l1.push_back(3);
		l1.push_back(4);

		list<int>::iterator it = l1.begin();
		while (it != l1.end()) {
			cout << *it << " ";
			it++;
		}
		cout << endl;

		//l1.erase(++l1.begin());


		l1.pop_back();
		list<int>::iterator e = l1.begin();
		while (e != l1.end()) {
			cout << *e << " ";
			e++;
		}
		cout << endl;

		l1.pop_front();
		list<int>::iterator i = l1.begin();
		while (i != l1.end()) {
			cout << *i << " ";
			i++;
		}
		cout << endl;
	}

	void test2() {
		list<int> l1;
		l1.push_back(1);
		l1.push_back(2);
		l1.push_back(3);
		l1.push_back(4);

		l1.func();
	}

	void test3() {
		list<int> l1;
		l1.push_back(1);
		l1.push_back(2);
		l1.push_back(3);
		l1.push_back(4);

		list<int>::reverse_iterator rit = l1.rbegin();
		while (rit != l1.rend()) {
			cout << *rit << " ";
			++rit;
		}
		cout << endl;
	}
	
	void test4() {
		vector<int> v;
		v.push_back(1);
		v.push_back(2);
		v.push_back(3);
		v.push_back(4);

		vector<int>::reverse_iterator it = v.rbegin();
		while (it != v.rend()) {
			cout << *it << " ";
			++it;
		}
		cout << endl;
	}
}

template<class T,size_t N>
class Stack {
private:
	T _a[N];
	int _top;

public:
	void fun() {}
};

int main() {
	lhl::test4();
	//Stack<int,10> s1;
	//Stack<int,30> s2;
	return 0;
}
